try:
    import langchain
    result = f"✅ langchain 包已成功安装!\n版本: {langchain.__version__}"
    print(result)
    # 写入文件以便确认
    with open('langchain_verification_result.txt', 'w', encoding='utf-8') as f:
        f.write(result)
except ImportError:
    result = "❌ langchain 包未安装成功!"
    print(result)
    # 写入文件以便确认
    with open('langchain_verification_result.txt', 'w', encoding='utf-8') as f:
        f.write(result)